package com.gmail.dengtao.joe.group.transport.impl;

import com.gmail.dengtao.joe.group.channel.Channel;
import com.gmail.dengtao.joe.group.interceptor.InterceptorStack;
import com.gmail.dengtao.joe.group.transport.ChannelReceiver;
import com.gmail.dengtao.joe.transport.handler.HandlerAdapter;

public abstract class AbstractSenderHandler extends HandlerAdapter {

	protected Channel channel;
	protected InterceptorStack interceptorStack = null;

	protected int idleTimeForWrite = 0;		// idle time for write in seconds.

	/**
	 * Set idle time for write in seconds, you should call this method before {@link ChannelReceiver#start()}.
	 * @param idleTimeForWrite
	 * @since 1.0
	 */	
	public void setIdleTimeForWrite(int idleTimeForWrite) {
		this.idleTimeForWrite = idleTimeForWrite;
	}

	public void setInterceptorStack(InterceptorStack interceptorStack) {
		this.interceptorStack = interceptorStack;
	}
}